function newPay(res, prepayId, redirectUrl){
  // 发起支付
  wx.requestPayment({
    timeStamp: res.timeStamp,
    nonceStr: res.nonceStr,
    package: res.package,
    signType: res.signType,
    paySign: res.paySign,
    fail: function (aaa) {
      wx.showToast({
        title: '支付失败:'
      })
      console.log(aaa);
    },
    success: function () {
      // 提示支付成功
      wx.showToast({
        title: '支付成功'
      })
      wx.redirectTo({
        url: redirectUrl
      });
    }
  })
}

module.exports = {
  newPay:newPay
}